package com.bsj.travel.def.common.VO;

import com.bsj.travel.constant.NumericalConstants;
import lombok.Data;

import java.util.List;

/***
 * @description UserTreeVO
 * @author LiJiaXin
 * @version 1.0.0
 * @time 2024/1/10 11:07
 **/
@Data
public class UserTreeVO {

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 用户名
     */
    private String userName;

    /**
     * 父ID
     */
    private Integer parentId;

    /**
     * 当前节点子用户数量
     */
    private Integer total = NumericalConstants.ZERO;

    /**
     * 下级用户集
     */
    private List<UserTreeVO> children;

    public void setTotalValue() {
        total += 1;
    }

}
